package CountNumberswithUniqueDigits;

public class Solution {
    public int countNumbersWithUniqueDigits(int n) {
        int base=9,result=10;
    	if (n==0) return 1;
    	if (n==1) return 10;
        for (int i=2;i<=n;i++){
        	base=base*(11-i);
        	result=result+base;
        }
        return result;
    }
}
